﻿@model Survey.Common.Models.Services.HowTos.ISimpleEntityModel

@if (Model.IsAction(Str.Actions.New)) { return; }


@* ROW Combo *@
<fieldset class="w98p mh80 "><legend>
The <b>READONLY</b> list of ComplexEntities,
which mapp this instance as a property <b>SimpleCombo</b></legend><div>
@AddControls(
    new AsyncListView()
        .SetJsonController(Str.Controllers.ComplexEntity)
        .SetJsonAction(Str.Actions.Special.AsyncList) // this is default anyway
        .AddJsonRouteValue("SimpleCombo", Model.Item.ID)
        .AddJsonRouteValue("MaxRowsPerPage", 2)
)
</div></fieldset>

@* ROW Async *@
<fieldset class="w98p mh80 "><legend>
The <b>EXTENSIBLE</b> list of ComplexEntities (ADD),
which mapp this instance as a property <b>SimpleAsync</b></legend><div>
@AddControls(
    new AsyncListView()
        .SetAddedItemsCollection(() => Model.Item.NewComplexAsync)
        .AddJsonRouteValue("SimpleAsync", Model.Item.ID)
        .AddJsonRouteValue("MaxRowsPerPage", 2)
        .SetNoResultText("NoComplexFound")
)
</div></fieldset>

@* ROW Async *@
<fieldset class="w98p mh80 "><legend>
The <b>MANAGABLE</b> list of ComplexEntities (ADD and REMOVE),
mapped as a property <b>SimpleAuto</b></legend><div>
@AddControls(
    new AsyncListView()
        .SetAddedItemsCollection(() => Model.Item.NewComplexAuto)
        .SetRemovedItemsCollection(() => Model.Item.RemovedComplexAuto)
        .AddJsonRouteValue("SimpleAuto", Model.Item.ID)
        .AddJsonRouteValue("MaxRowsPerPage", 2)
        .SetNoResultText("NoComplexFound")
)

</div></fieldset>